#pragma once

#include <sfml/Graphics.hpp>


//TODO: Make this more autonomous
class Cursor
{
public:
	Cursor(): img(0) { }
	~Cursor() {}

	inline void SetImage(sf::Image* img) {this->img = img; }
	inline void SetHotspot(int x, int y) { hotspot.x = x; hotspot.y = y; }
	inline const sf::Vector2i& GetHotspot() const { return hotspot; }
	inline void Move(const sf::Vector2f& pos) { this->pos.x += pos.x; this->pos.y += pos.y; }
	inline void Move(float xOffset, float yOffset) { pos.x += xOffset; pos.y += yOffset; }
	inline void SetPos(const sf::Vector2f& pos) { this->pos = pos; }
	inline void SetPos(float x, float y) { pos.x = x; pos.y = y; }
	inline const sf::Vector2f& GetPos() const { return pos; }
	inline const sf::Image* GetImage() const { return img; }
	void Draw(sf::RenderWindow* window);

private:
	sf::Vector2i hotspot;
	sf::Vector2f pos;
	sf::Image* img;
};
